<?php 
$com->setButtonsContent(array 
(
	0 => array 
	(	
		'title' => ucfirst($txt->getWord('login')),
		'href' => '',
		'onclick' => 'document.getElementById(\''.$com->Id.'_login_user\').submit();',
	),
	1 => array 
	(	
		'title' => ucfirst($txt->getWord('forgot_password')),
		'href' => '',
		'onclick' => 'document.getElementById(\''.$com->Id.'_com_forgot_password\').style.display=\'block\';',
	)
));
$buttonsForgot = array 
(
	0 => array 
	(	
		'title' => ucfirst($txt->getWord('send')),
		'href' => '',
		'onclick' => 'document.getElementById(\''.$com->Id.'_com_forgot_password_form\').submit();',
	)
);
?>
<?php if(!($_SESSION['userid'] > 0)): ?>
<form id="<?php echo $com->Id; ?>_login_user" action="" method="post" enctype="multipart/form-data" name="login_user">
<fieldset class="com_form">
    <label for="name"><?php echo ucfirst($txt->getWord('e-mail')); ?></label>
    <?php 
        if($user->Error['username'])
        { echo '<span class="error">'.ucfirst($user->Error['username']).'</span><br />'; }
        if($user->Info['username'])
        { echo '<span class="info">'.ucfirst($user->Info['username']).'</span><br />'; }
    ?>
    <input name="username" type="text" value="" maxlength="100" />
    <div class="form-field-v-space">&nbsp;</div>
    <label for="password"><?php echo ucfirst($txt->getWord('password')); ?></label>
    <?php 
        if($user->Error['password'])
        { echo '<span class="error">'.ucfirst($user->Error['password']).'</span><br />'; }
        if($user->Error['info'])
        { echo '<span class="info">'.ucfirst($user->Info['password']).'</span><br />'; }
    ?>
    <input name="password" type="password" value="" maxlength="30" />
    <input type="hidden" name="action" value="login_user" /><br /><br />
    <?php echo getButtonsHTML($theme->HFBSets[$theme->ComHFB]['button'], $com->getButtonsContent()); ?>
</fieldset>
</form>
<div id="<?php echo $com->Id; ?>_com_forgot_password" class="forgot_password" <?php if($_REQUEST['formname'] != $com->Id.'_com_forgot_password_form') echo 'style="display:none;"'; ?>><br /><hr /><br />
<form id="<?php echo $com->Id; ?>_com_forgot_password_form" action="<?php echo $katana->getFormAction(); ?>" method="post" enctype="multipart/form-data" name="forgot_password">
<h3><?php echo ucfirst($txt->getWord('forgot_password')); ?></h3>
<fieldset class="com_form">
    <label for="username_email"><?php echo ucfirst($txt->getWord('type_in').' '.$txt->getWord('username').' '.$txt->getWord('or').' '.$txt->getWord('e-mail')); ?></label>
    <?php 
        if($user->Error['username_email'])
        { echo '<br /><span class="error">'.ucfirst($user->Error['username_email']).'</span>'; }
        if($user->Info['username_email'])
        { echo '<br /><span class="info">'.ucfirst($user->Info['username_email']).'</span>'; }
    ?>
    <input name="username_email" type="text" value="<?php echo $_REQUEST['username_email']; ?>" maxlength="100" />
    <input type="hidden" name="action" value="reset_password" /><input type="hidden" name="formname" value="<?php echo $com->Id; ?>_com_forgot_password_form" /><br /><br />
    <?php echo getButtonsHTML($theme->HFBSets[$theme->ComHFB]['button'], $buttonsForgot); ?>
</fieldset>
</form>
</div>
<?php $katana->addAnalyticsTrack("_gaq.push(['_trackPageview', '/user/login']);"); ?>
<?php endif; ?>